﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BDShop.DAL;
using BDShop.Entities;
using IsolationLevel = System.Transactions.IsolationLevel;

namespace BDShop.Business
{
    public class ProductTagService
    {
        public static List<ProductTag> GetListProductByTag(int tagID)
        {
            List<ProductTag> lstProductTag = new List<ProductTag>();
            using (var context = new BDShopEntities(IsolationLevel.ReadUncommitted))
            {
                lstProductTag = context.ProductTags.Where(t => t.TagID == tagID).ToList();
            }

            return lstProductTag;
        }
    }
}
